/**      
 * @file		passbyvalue.cpp
 * @description		Demonstrates function calls that utilize pass by value
 *			arguments.
 * @course		CSCI 123 Section 00000
 * @assignment		Lecture 4 - Sample 8
 * @date		mm/dd/yyyy	
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

/*
 * Squares an number
 * @param a the number to be squared
 * @pre a has been initialized
 * @post a is squared
 * @return the result of a being squared
 */
int square(int a);

/**
 * @return zero if the application executes successfully
 */
int main() {
	int a = 10;
	cout << "A in main " << a << endl;
	cout << "Square: " << square(a) << endl;
	// Notice that a in the main is not effected by the 
	// function call to square
	cout << "In main: " << a << endl;
	return 0;
}

int square(int a) {
	a *= a;
	cout << "\tinside " << a << endl;
	return a;
}
